.class public Lcom/xingbook/ui/a/a;
.super Lcom/xingbook/ui/a/c;

# interfaces
.implements Landroid/media/MediaPlayer$OnCompletionListener;
.implements Lcom/xingbook/ui/a/ac;


# annotations
.annotation build Landroid/annotation/SuppressLint;
    value = {
        "ViewConstructor"
    }
.end annotation


# instance fields
.field private n:I

.field private o:Lcn/a/a/b/a;

.field private p:Landroid/media/MediaPlayer;

.field private q:I

.field private r:Lcn/a/a/a/d;

.field private s:Lcom/xingbook/d/d;

.field private t:Z

.field private u:Ljava/util/Timer;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/xingbook/ui/b/a;Lcn/a/a/b/b;Lcom/xingbook/c/e;Lcom/xingbook/d/a;)V
    .locals 1

    invoke-direct {p0, p1, p2, p3, p4}, Lcom/xingbook/ui/a/c;-><init>(Landroid/content/Context;Lcom/xingbook/ui/b/a;Lcn/a/a/b/b;Lcom/xingbook/c/e;)V

    const/4 v0, -0x1

    iput v0, p0, Lcom/xingbook/ui/a/a;->n:I

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/xingbook/ui/a/a;->t:Z

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/ui/a/a;->u:Ljava/util/Timer;

    check-cast p3, Lcn/a/a/b/a;

    iput-object p3, p0, Lcom/xingbook/ui/a/a;->o:Lcn/a/a/b/a;

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->o:Lcn/a/a/b/a;

    invoke-virtual {v0}, Lcn/a/a/b/a;->a()I

    move-result v0

    invoke-virtual {p5, v0}, Lcom/xingbook/d/a;->f(I)Lcn/a/a/a/d;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/ui/a/a;->r:Lcn/a/a/a/d;

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->o:Lcn/a/a/b/a;

    invoke-virtual {v0}, Lcn/a/a/b/a;->j()I

    move-result v0

    iput v0, p0, Lcom/xingbook/ui/a/a;->q:I

    return-void
.end method

.method static synthetic a(Lcom/xingbook/ui/a/a;)I
    .locals 1

    iget v0, p0, Lcom/xingbook/ui/a/a;->n:I

    return v0
.end method

.method private a(I)Landroid/util/SparseArray;
    .locals 7

    new-instance v3, Landroid/util/SparseArray;

    invoke-direct {v3}, Landroid/util/SparseArray;-><init>()V

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->c:Lcn/a/a/b/b;

    invoke-virtual {v0}, Lcn/a/a/b/b;->g()[Lcn/a/a/d/c;

    move-result-object v4

    array-length v5, v4

    const/4 v0, 0x0

    move v2, v0

    move v1, p1

    :goto_0
    if-lt v2, v5, :cond_0

    return-object v3

    :cond_0
    aget-object v0, v4, v2

    invoke-virtual {v0}, Lcn/a/a/d/c;->m()I

    move-result v0

    invoke-virtual {v3}, Landroid/util/SparseArray;->size()I

    move-result v6

    if-nez v6, :cond_1

    if-lt v0, v1, :cond_2

    sub-int v1, v0, v1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v3, v0, v1}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    :goto_1
    add-int/lit8 v1, v2, 0x1

    move v2, v1

    move v1, v0

    goto :goto_0

    :cond_1
    if-le v0, v1, :cond_2

    sub-int v1, v0, v1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v3, v0, v1}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    goto :goto_1

    :cond_2
    move v0, v1

    goto :goto_1
.end method

.method private a(Landroid/util/SparseArray;)V
    .locals 5

    invoke-virtual {p1}, Landroid/util/SparseArray;->size()I

    move-result v0

    if-lez v0, :cond_0

    new-instance v0, Ljava/util/Timer;

    invoke-direct {v0}, Ljava/util/Timer;-><init>()V

    iput-object v0, p0, Lcom/xingbook/ui/a/a;->u:Ljava/util/Timer;

    iget-object v1, p0, Lcom/xingbook/ui/a/a;->u:Ljava/util/Timer;

    new-instance v2, Lcom/xingbook/ui/a/b;

    invoke-direct {v2, p0, p1}, Lcom/xingbook/ui/a/b;-><init>(Lcom/xingbook/ui/a/a;Landroid/util/SparseArray;)V

    const/4 v0, 0x0

    invoke-virtual {p1, v0}, Landroid/util/SparseArray;->valueAt(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    int-to-long v3, v0

    invoke-virtual {v1, v2, v3, v4}, Ljava/util/Timer;->schedule(Ljava/util/TimerTask;J)V

    :cond_0
    return-void
.end method

.method static synthetic a(Lcom/xingbook/ui/a/a;Landroid/util/SparseArray;)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/xingbook/ui/a/a;->a(Landroid/util/SparseArray;)V

    return-void
.end method

.method static synthetic b(Lcom/xingbook/ui/a/a;)I
    .locals 1

    iget v0, p0, Lcom/xingbook/ui/a/a;->q:I

    return v0
.end method


# virtual methods
.method public a()V
    .locals 2

    iget v0, p0, Lcom/xingbook/ui/a/a;->n:I

    const/4 v1, 0x1

    if-ne v0, v1, :cond_1

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->u:Ljava/util/Timer;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->u:Ljava/util/Timer;

    invoke-virtual {v0}, Ljava/util/Timer;->cancel()V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/ui/a/a;->u:Ljava/util/Timer;

    :cond_0
    :try_start_0
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->getCurrentPosition()I

    move-result v0

    invoke-direct {p0, v0}, Lcom/xingbook/ui/a/a;->a(I)Landroid/util/SparseArray;

    move-result-object v0

    iget-object v1, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v1}, Landroid/media/MediaPlayer;->start()V

    invoke-virtual {v0}, Landroid/util/SparseArray;->size()I

    move-result v1

    if-lez v1, :cond_1

    invoke-direct {p0, v0}, Lcom/xingbook/ui/a/a;->a(Landroid/util/SparseArray;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :cond_1
    :goto_0
    return-void

    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method public a(Lcom/xingbook/d/d;)V
    .locals 0

    iput-object p1, p0, Lcom/xingbook/ui/a/a;->s:Lcom/xingbook/d/d;

    return-void
.end method

.method public a(Z)V
    .locals 7

    const/4 v3, 0x2

    const/4 v6, 0x0

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->b:Lcom/xingbook/ui/b/a;

    iget-object v1, p0, Lcom/xingbook/ui/a/a;->c:Lcn/a/a/b/b;

    invoke-virtual {v1}, Lcn/a/a/b/b;->i()I

    move-result v1

    iget-object v2, p0, Lcom/xingbook/ui/a/a;->c:Lcn/a/a/b/b;

    invoke-virtual {v2}, Lcn/a/a/b/b;->j()I

    move-result v2

    invoke-virtual {v0, v1, v2, v3}, Lcom/xingbook/ui/b/a;->b(III)V

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    if-eqz v0, :cond_4

    :try_start_0
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->isPlaying()Z
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    :goto_0
    if-nez v0, :cond_4

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->u:Ljava/util/Timer;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->u:Ljava/util/Timer;

    invoke-virtual {v0}, Ljava/util/Timer;->cancel()V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/ui/a/a;->u:Ljava/util/Timer;

    :cond_0
    iget v0, p0, Lcom/xingbook/ui/a/a;->n:I

    const/4 v1, -0x1

    if-eq v0, v1, :cond_1

    iget v0, p0, Lcom/xingbook/ui/a/a;->n:I

    if-ne v0, v3, :cond_2

    :cond_1
    :try_start_1
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->reset()V

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    iget-object v1, p0, Lcom/xingbook/ui/a/a;->r:Lcn/a/a/a/d;

    invoke-virtual {v1}, Lcn/a/a/a/d;->a()Ljava/io/FileDescriptor;

    move-result-object v1

    iget-object v2, p0, Lcom/xingbook/ui/a/a;->r:Lcn/a/a/a/d;

    invoke-virtual {v2}, Lcn/a/a/a/d;->c()J

    move-result-wide v2

    iget-object v4, p0, Lcom/xingbook/ui/a/a;->r:Lcn/a/a/a/d;

    invoke-virtual {v4}, Lcn/a/a/a/d;->d()J

    move-result-wide v4

    invoke-virtual/range {v0 .. v5}, Landroid/media/MediaPlayer;->setDataSource(Ljava/io/FileDescriptor;JJ)V

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->prepare()V
    :try_end_1
    .catch Ljava/lang/IllegalStateException; {:try_start_1 .. :try_end_1} :catch_1
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_2

    :cond_2
    :goto_1
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->getCurrentPosition()I

    move-result v0

    if-eqz p1, :cond_3

    const/16 v1, 0xa

    if-ge v0, v1, :cond_3

    iget-object v1, p0, Lcom/xingbook/ui/a/a;->b:Lcom/xingbook/ui/b/a;

    iget v2, p0, Lcom/xingbook/ui/a/a;->q:I

    const/4 v3, 0x5

    invoke-virtual {v1, v2, v3}, Lcom/xingbook/ui/b/a;->a(II)Z

    :cond_3
    invoke-direct {p0, v0}, Lcom/xingbook/ui/a/a;->a(I)Landroid/util/SparseArray;

    move-result-object v0

    iget-object v1, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v1}, Landroid/media/MediaPlayer;->start()V

    invoke-virtual {v0}, Landroid/util/SparseArray;->size()I

    move-result v1

    if-lez v1, :cond_4

    invoke-direct {p0, v0}, Lcom/xingbook/ui/a/a;->a(Landroid/util/SparseArray;)V

    :cond_4
    iput v6, p0, Lcom/xingbook/ui/a/a;->n:I

    return-void

    :catch_0
    move-exception v0

    move v0, v6

    goto :goto_0

    :catch_1
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/IllegalStateException;->printStackTrace()V

    goto :goto_1

    :catch_2
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_1
.end method

.method public b()V
    .locals 3

    const/4 v2, 0x1

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :try_start_0
    iget-object v1, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v1}, Landroid/media/MediaPlayer;->isPlaying()Z
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    :goto_0
    if-eqz v0, :cond_1

    invoke-virtual {p0, v2}, Lcom/xingbook/ui/a/a;->b(Z)V

    :cond_0
    :goto_1
    return-void

    :cond_1
    invoke-virtual {p0, v2}, Lcom/xingbook/ui/a/a;->a(Z)V

    goto :goto_1

    :catch_0
    move-exception v1

    goto :goto_0
.end method

.method public b(Z)V
    .locals 3

    :try_start_0
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->isPlaying()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->pause()V

    const/4 v0, 0x1

    iput v0, p0, Lcom/xingbook/ui/a/a;->n:I

    if-eqz p1, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->b:Lcom/xingbook/ui/b/a;

    iget v1, p0, Lcom/xingbook/ui/a/a;->q:I

    const/4 v2, 0x6

    invoke-virtual {v0, v1, v2}, Lcom/xingbook/ui/b/a;->a(II)Z
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0

    :cond_0
    :goto_0
    return-void

    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method public c()V
    .locals 6

    invoke-super {p0}, Lcom/xingbook/ui/a/c;->c()V

    new-instance v0, Landroid/media/MediaPlayer;

    invoke-direct {v0}, Landroid/media/MediaPlayer;-><init>()V

    iput-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    :try_start_0
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    iget-object v1, p0, Lcom/xingbook/ui/a/a;->r:Lcn/a/a/a/d;

    invoke-virtual {v1}, Lcn/a/a/a/d;->a()Ljava/io/FileDescriptor;

    move-result-object v1

    iget-object v2, p0, Lcom/xingbook/ui/a/a;->r:Lcn/a/a/a/d;

    invoke-virtual {v2}, Lcn/a/a/a/d;->c()J

    move-result-wide v2

    iget-object v4, p0, Lcom/xingbook/ui/a/a;->r:Lcn/a/a/a/d;

    invoke-virtual {v4}, Lcn/a/a/a/d;->d()J

    move-result-wide v4

    invoke-virtual/range {v0 .. v5}, Landroid/media/MediaPlayer;->setDataSource(Ljava/io/FileDescriptor;JJ)V

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0, p0}, Landroid/media/MediaPlayer;->setOnCompletionListener(Landroid/media/MediaPlayer$OnCompletionListener;)V

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->prepare()V
    :try_end_0
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_2

    :goto_0
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->o:Lcn/a/a/b/a;

    invoke-virtual {v0}, Lcn/a/a/b/a;->f()Lcn/a/a/d/e;

    move-result-object v0

    invoke-virtual {v0}, Lcn/a/a/d/e;->a()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/media/MediaPlayer;->setLooping(Z)V

    :cond_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/IllegalArgumentException;->printStackTrace()V

    goto :goto_0

    :catch_1
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/IllegalStateException;->printStackTrace()V

    goto :goto_0

    :catch_2
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_0
.end method

.method public c(Z)V
    .locals 3

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    if-eqz v0, :cond_2

    const/4 v0, 0x0

    :try_start_0
    iget-object v1, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v1}, Landroid/media/MediaPlayer;->isPlaying()Z
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    :goto_0
    if-nez v0, :cond_0

    iget v0, p0, Lcom/xingbook/ui/a/a;->n:I

    const/4 v1, 0x1

    if-ne v0, v1, :cond_2

    :cond_0
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->stop()V

    if-eqz p1, :cond_1

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->b:Lcom/xingbook/ui/b/a;

    iget v1, p0, Lcom/xingbook/ui/a/a;->q:I

    const/4 v2, 0x7

    invoke-virtual {v0, v1, v2}, Lcom/xingbook/ui/b/a;->a(II)Z

    :cond_1
    const/4 v0, 0x2

    iput v0, p0, Lcom/xingbook/ui/a/a;->n:I

    :cond_2
    return-void

    :catch_0
    move-exception v1

    goto :goto_0
.end method

.method public d()V
    .locals 5

    const/16 v3, 0x11

    const/4 v2, 0x1

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->s:Lcom/xingbook/d/d;

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->o:Lcn/a/a/b/a;

    invoke-virtual {v0}, Lcn/a/a/b/a;->f()Lcn/a/a/d/e;

    move-result-object v0

    invoke-virtual {v0}, Lcn/a/a/d/e;->b()Z

    move-result v0

    if-eqz v0, :cond_0

    new-instance v1, Landroid/os/Message;

    invoke-direct {v1}, Landroid/os/Message;-><init>()V

    iput v3, v1, Landroid/os/Message;->what:I

    invoke-virtual {p0}, Lcom/xingbook/ui/a/a;->getmBaseItem()Lcn/a/a/b/b;

    move-result-object v0

    invoke-virtual {v0}, Lcn/a/a/b/b;->j()I

    move-result v0

    iput v0, v1, Landroid/os/Message;->arg1:I

    iput v2, v1, Landroid/os/Message;->arg2:I

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->b:Lcom/xingbook/ui/b/a;

    iget-object v2, v0, Lcom/xingbook/ui/b/a;->m:Landroid/os/Handler;

    invoke-virtual {p0}, Lcom/xingbook/ui/a/a;->getmBaseItem()Lcn/a/a/b/b;

    move-result-object v0

    check-cast v0, Lcn/a/a/b/a;

    invoke-virtual {v0}, Lcn/a/a/b/a;->b()I

    move-result v0

    int-to-long v3, v0

    invoke-virtual {v2, v1, v3, v4}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z

    :cond_0
    :goto_0
    invoke-super {p0}, Lcom/xingbook/ui/a/c;->d()V

    return-void

    :cond_1
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->s:Lcom/xingbook/d/d;

    invoke-interface {v0}, Lcom/xingbook/d/d;->getSetting()Lcom/xingbook/d/c;

    move-result-object v0

    invoke-interface {v0}, Lcom/xingbook/d/c;->c()Z

    move-result v0

    if-eqz v0, :cond_0

    new-instance v1, Landroid/os/Message;

    invoke-direct {v1}, Landroid/os/Message;-><init>()V

    iput v3, v1, Landroid/os/Message;->what:I

    invoke-virtual {p0}, Lcom/xingbook/ui/a/a;->getmBaseItem()Lcn/a/a/b/b;

    move-result-object v0

    invoke-virtual {v0}, Lcn/a/a/b/b;->j()I

    move-result v0

    iput v0, v1, Landroid/os/Message;->arg1:I

    iput v2, v1, Landroid/os/Message;->arg2:I

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->b:Lcom/xingbook/ui/b/a;

    iget-object v2, v0, Lcom/xingbook/ui/b/a;->m:Landroid/os/Handler;

    invoke-virtual {p0}, Lcom/xingbook/ui/a/a;->getmBaseItem()Lcn/a/a/b/b;

    move-result-object v0

    check-cast v0, Lcn/a/a/b/a;

    invoke-virtual {v0}, Lcn/a/a/b/a;->b()I

    move-result v0

    int-to-long v3, v0

    invoke-virtual {v2, v1, v3, v4}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z

    goto :goto_0
.end method

.method public e()V
    .locals 2

    :try_start_0
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->isPlaying()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/media/MediaPlayer;->setOnCompletionListener(Landroid/media/MediaPlayer$OnCompletionListener;)V

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->stop()V
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0

    :cond_0
    :goto_0
    const/4 v0, -0x1

    iput v0, p0, Lcom/xingbook/ui/a/a;->n:I

    invoke-super {p0}, Lcom/xingbook/ui/a/c;->e()V

    return-void

    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method public f()V
    .locals 1

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->release()V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    :cond_0
    invoke-super {p0}, Lcom/xingbook/ui/a/c;->f()V

    return-void
.end method

.method public g()V
    .locals 1

    invoke-super {p0}, Lcom/xingbook/ui/a/c;->g()V

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->r:Lcn/a/a/a/d;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->r:Lcn/a/a/a/d;

    invoke-virtual {v0}, Lcn/a/a/a/d;->b()V

    :cond_0
    return-void
.end method

.method public getDuration()I
    .locals 6

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    if-eqz v0, :cond_2

    iget v0, p0, Lcom/xingbook/ui/a/a;->n:I

    const/4 v1, -0x1

    if-eq v0, v1, :cond_0

    iget v0, p0, Lcom/xingbook/ui/a/a;->n:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_1

    :cond_0
    :try_start_0
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->reset()V

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    iget-object v1, p0, Lcom/xingbook/ui/a/a;->r:Lcn/a/a/a/d;

    invoke-virtual {v1}, Lcn/a/a/a/d;->a()Ljava/io/FileDescriptor;

    move-result-object v1

    iget-object v2, p0, Lcom/xingbook/ui/a/a;->r:Lcn/a/a/a/d;

    invoke-virtual {v2}, Lcn/a/a/a/d;->c()J

    move-result-wide v2

    iget-object v4, p0, Lcom/xingbook/ui/a/a;->r:Lcn/a/a/a/d;

    invoke-virtual {v4}, Lcn/a/a/a/d;->d()J

    move-result-wide v4

    invoke-virtual/range {v0 .. v5}, Landroid/media/MediaPlayer;->setDataSource(Ljava/io/FileDescriptor;JJ)V

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->prepare()V
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1

    :cond_1
    :goto_0
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->getDuration()I

    move-result v0

    :goto_1
    return v0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/IllegalStateException;->printStackTrace()V

    goto :goto_0

    :catch_1
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_0

    :cond_2
    const/4 v0, 0x0

    goto :goto_1
.end method

.method public getPlayer()Landroid/media/MediaPlayer;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    return-object v0
.end method

.method public onCompletion(Landroid/media/MediaPlayer;)V
    .locals 3

    const/4 v0, 0x2

    iput v0, p0, Lcom/xingbook/ui/a/a;->n:I

    :try_start_0
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->p:Landroid/media/MediaPlayer;

    invoke-virtual {v0}, Landroid/media/MediaPlayer;->stop()V
    :try_end_0
    .catch Ljava/lang/NullPointerException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_1

    :goto_0
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->s:Lcom/xingbook/d/d;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->b:Lcom/xingbook/ui/b/a;

    instance-of v0, v0, Lcom/xingbook/ui/b/o;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->b:Lcom/xingbook/ui/b/a;

    check-cast v0, Lcom/xingbook/ui/b/o;

    invoke-virtual {v0}, Lcom/xingbook/ui/b/o;->m()V

    iget-object v0, p0, Lcom/xingbook/ui/a/a;->s:Lcom/xingbook/d/d;

    invoke-interface {v0}, Lcom/xingbook/d/d;->g()V

    :cond_0
    iget-object v0, p0, Lcom/xingbook/ui/a/a;->b:Lcom/xingbook/ui/b/a;

    iget v1, p0, Lcom/xingbook/ui/a/a;->q:I

    const/4 v2, 0x7

    invoke-virtual {v0, v1, v2}, Lcom/xingbook/ui/b/a;->a(II)Z

    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/NullPointerException;->printStackTrace()V

    goto :goto_0

    :catch_1
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/IllegalStateException;->printStackTrace()V

    goto :goto_0
.end method

.method public setSilent(Z)V
    .locals 0

    iput-boolean p1, p0, Lcom/xingbook/ui/a/a;->t:Z

    return-void
.end method
